<template>
  <div @click="fatherFn">
    <button @click.stop="btn1">阻止事件冒泡</button>
    <a @click.prevent.stop href="http://www.taobao.com">去购物</a>
    <button @click.once="btn2">程序运行期间只执行一次函数</button>
  </div>
</template>

<script>
export default {
methods:{
  fatherFn(){
    console.log("father事件触发了");
  },
  btn1(){},
  btn2(){
    console.log("只触发一次的按钮");
  }
}
}
</script>

<style>

</style>